/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('goods_series', {
    id: {
      type: DataTypes.INTEGER(11).UNSIGNED,
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    series_name: {
      type: DataTypes.STRING(20),
      allowNull: false,
      defaultValue: ''
    },
    dparam_values: {
      type: DataTypes.STRING(1000),
      allowNull: false,
      defaultValue: ''
    },
    sattr_values: {
      type: DataTypes.STRING(1000),
      allowNull: false,
      defaultValue: ''
    },
    isstatus: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      defaultValue: '1'
    },
    createdAt: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
    },
    updatedAt: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
    }
  }, {
    tableName: 'goods_series'
  });
};
